import request from '@/utils/request'

// 查询来料检列表
export function getMainTaskPage(query) {
  return request({
    url: '/quality/qualityMainTask/list',
    method: 'get',
    params: query
  })
}

// 查询BOM信息
export function getBonInfo(id) {
  return request({
    url: '/system/bom/' + id,
    method: 'get'
  })
}

// 新增物料BOM
export function addBomInfo(data) {
  return request({
    url: '/system/bom',
    method: 'post',
    data: data
  })
}

// 修改物料BOM
export function updateBomInfo(data) {
  return request({
    url: '/system/bom',
    method: 'put',
    data: data
  })
}
// 修改销售订单状态
export function scrapBom(id) {
  return request({
    url: '/system/bom/scrap/' + id,
    method: 'get'
  })
}

// 删除BOM信息
export function delBomInfo(id) {
  return request({
    url: '/system/bom/' + id,
    method: 'delete'
  })
}

